package com.ruoyi.pet.service.impl;

import java.util.List;

import com.ruoyi.pet.domain.PetMedicine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pet.mapper.PetMedicineMapper;
import com.ruoyi.pet.service.IPetMedicineService;

/**
 * 药品库存信息Service业务层处理
 * 
 * @author 木有枝
 * @date 2025-04-13
 */
@Service
public class PetMedicineServiceImpl implements IPetMedicineService 
{
    @Autowired
    private PetMedicineMapper petMedicineMapper;

    /**
     * 查询药品库存信息
     * 
     * @param medicineId 药品库存信息主键
     * @return 药品库存信息
     */
    @Override
    public PetMedicine selectPetMedicineByMedicineId(Long medicineId)
    {
        return petMedicineMapper.selectPetMedicineByMedicineId(medicineId);
    }

    /**
     * 查询药品库存信息列表
     * 
     * @param petMedicine 药品库存信息
     * @return 药品库存信息
     */
    @Override
    public List<PetMedicine> selectPetMedicineList(PetMedicine petMedicine)
    {
        return petMedicineMapper.selectPetMedicineList(petMedicine);
    }

    /**
     * 新增药品库存信息
     * 
     * @param petMedicine 药品库存信息
     * @return 结果
     */
    @Override
    public int insertPetMedicine(PetMedicine petMedicine)
    {
        return petMedicineMapper.insertPetMedicine(petMedicine);
    }

    /**
     * 修改药品库存信息
     * 
     * @param petMedicine 药品库存信息
     * @return 结果
     */
    @Override
    public int updatePetMedicine(PetMedicine petMedicine)
    {
        return petMedicineMapper.updatePetMedicine(petMedicine);
    }

    /**
     * 批量删除药品库存信息
     * 
     * @param medicineIds 需要删除的药品库存信息主键
     * @return 结果
     */
    @Override
    public int deletePetMedicineByMedicineIds(Long[] medicineIds)
    {
        return petMedicineMapper.deletePetMedicineByMedicineIds(medicineIds);
    }

    /**
     * 删除药品库存信息信息
     * 
     * @param medicineId 药品库存信息主键
     * @return 结果
     */
    @Override
    public int deletePetMedicineByMedicineId(Long medicineId)
    {
        return petMedicineMapper.deletePetMedicineByMedicineId(medicineId);
    }
}
